package xy.http.config;

import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import xy.http.util.HttpClientUtil;

import javax.annotation.Resource;

@Configuration
//@ConditionalOnProperty(value = "http.type",havingValue = "httpclient",matchIfMissing = true)
public class HttpClientConfig {

    @Resource
    private HttpConfig httpConfig;

    @Bean
    public HttpClientUtil httpClientUtil(){
       return new HttpClientUtil(httpConfig);
    }

}
